package stackcontract;

import java.util.ArrayList;

public class CollectingBooks<T> extends StackSimpleImp<Object> {
	private Book book;
	private ArrayList<Book>books= new ArrayList<Book>();
	
	
	 

	@Override
	
	public int size() {
		
		return books.size();
	}

	@Override
	public Book peek() {
		
		return books.get(size()-1);
	}

	@Override
	public Book pop() {
		
		 
		return books.get(size()-1);
	}

	
	public void push(Book b) {
		
	books.add((Book)b);
		
	}

}
